home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CD ROM Paradise Collection 4
/
CD ROM Paradise Collection 4 1995 Nov.iso
/
program
/
swagg_m.zip
/
MEMORY.SWG
/
0023_Compare Memory Blocks.pas
< prev
next >
Wrap
Pascal/Delphi Source File
|
1993-08-27
|
701b
|
20 lines
{ JOACHIM BARTZ }
Function CompBlocks(Buf1, Buf2 : Pointer;
BufSize : Word) : Boolean; Assembler;
Asm { Compares two buffers and returns True if contents are equal }
PUSH DS
MOV AX,1 { Init error return: True }
LDS SI,Buf1
LES DI,Buf2
MOV CX,BufSize
JCXZ @@Done
CLD { Loop Until different or end of buffer }
REP CMPSB { Flag to bump SI,DI }
JE @@Done
{ Compare error }
XOR AX, AX { Return False }
@@Done:
POP DS { Restore }
end;